import pandas as pd
df = pd.DataFrame({'商品':['苹果','香蕉','梨','香蕉'],
                   '单价':[4,5,4,5],
                   '销量(kg)':[100,120,105,120],
                   '库存(kg)':[50,60,70,60]})
print('原始数据: \n',df)
print('检查所有列的重复值: \n',df.duplicated())
print('First: \n',df.duplicated('单价'))
print('Last: \n',df.duplicated('单价',keep='last'))
print('所有包含重复值的行为True: \n',df.duplicated('单价',keep=False))